﻿using System.Collections.Generic;
using System.Web.Services;
using System.Web.Script.Services;
using TiPort.TiEntityObjects;

namespace TI_App
{
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    [ScriptService]
    public class ControllerService : System.Web.Services.WebService
    {
        //Test Method
        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true, XmlSerializeString = false)]
        public List<Person> GetPeople()
        {
            List<Person> LP = new List<Person>();
            LP = TestFactory.GetPeopleController().GetPeople();
            return LP;
        }

        //[WebMethod]
        //[ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true, XmlSerializeString = false)]
        //public List<Notification> GetNotifications(int i)
        //{
        //    return Factory.GetNotificationController().GetNotifications(null);

        //}

        //public class P
        //{
        //    public int i { get; set; }
        //}

        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true, XmlSerializeString = false)]
        public List<Notification> GetNotifications(string i)
        {
            //return FactoryGetNotificationController().GetNotifications(null);

            return null;
        }
    }
}
